# -*- coding: utf-8 -*-

import sys
import time
import os
from tools import usefulTools

usefulTools_instances = usefulTools.userfulToolsFactory()

# 数据库配置
# dbTypeName 数据库类型 oracle | mysql
# stat_conn 统计库连接配置
# stat_db_name 统计库名称
# biz_conn 业务库连接配置
# biz_db_name 业务库名称
#=================================Oracle14======================================================
dbTypeName = "oracle"
stat_conn = {
    "host": "192.168.101.14",
    "port": 1521,
    "db": "cgdbstat0501",
    "user": "umstat",
    "password": "umstat",
    "charset": "utf8"
}
stat_db_name = "cgdbstat0501"
biz_conn = {
    "host": "192.168.101.14",
    "port": 1521,
    "db": "cgdb0501",
    "user": "dlsys",
    "password": "dlsys",
    "charset": "utf8"
}
biz_db_name = "cgdb0501"

#=================================mysql======================================================
# dbTypeName = "mysql"
# stat_conn = {
#     "host": "123.57.173.230",
#     "port": 3306,
#     "db": "cgdbstat",
#     "user": "root",
#     "password": "egova",
#     "charset": "utf8"
# }
# stat_db_name = "cgdbstat"
# biz_conn = {
#     "host": "123.57.173.230",
#     "port": 3306,
#     "db": "cgdb",
#     "user": "root",
#     "password": "egova",
#     "charset": "utf8"
# }
# biz_db_name = "cgdb"
# ================================================================
# 测试服务器地址
# base_url = "http://192.168.101.14:8080/eUrbanMIS/main.htm"
interface_base_url = "http://192.168.101.14:8080/eUrbanMIS/"

#系统使用的工作流ID
proc_def_id = 108

#常用的一些nav_item_id
nav_item_id = [1, 3, 6, 7, 8, 10, 11, 12, 13, 14,15,16,18, 600, 1401, 48]

#批转描述
timestr = time.strftime('%Y%m%d-%H-%M-%S', time.localtime(time.time()))
rec_transit_opinion_keys = "自动化脚本批转，时间：" + timestr
rec_finish_opinion_keys = "自动化脚本办结，时间：" + timestr
rec_operate_opinion_keys = "自动化脚本操作，时间：" + timestr

# 定义系统常用的一些变量值
path_dir = os.path.dirname(__file__)
path_base_dir = os.path.dirname(path_dir)
base_dir = sys.path[0]
relative_address = usefulTools_instances.creat_dir(path_base_dir + '/Result/')
pic_file_path = base_dir + '/Result/' + relative_address
update_pic_file = usefulTools_instances.update_file_path_deal(base_dir + '/updatefile/9.jpg')
update_word_file = usefulTools_instances.update_file_path_deal(base_dir + '/updatefile/test_repository_upload_file.docx')
interface_file = usefulTools_instances.file_path_deal(path_base_dir) + '/data/' + 'Interface_data_base.xlsx'
cookie_file = usefulTools_instances.file_path_deal(path_dir) + '/cookie.txt'
test_case_file = ''